<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>深入理解Linux文件系统</title>
    <link rel="stylesheet" href="https://cdn.staticfile.org/font-awesome/6.4.0/css/all.min.css">
    <link rel="stylesheet" href="https://cdn.staticfile.org/tailwindcss/2.2.19/tailwind.min.css">
    <link href="https://fonts.googleapis.com/css2?family=Noto+Serif+SC:wght@400;500;600;700&family=Noto+Sans+SC:wght@300;400;500;700&display=swap" rel="stylesheet">
    <script src="https://cdn.jsdelivr.net/npm/mermaid@latest/dist/mermaid.min.js"></script>
    <style>
        body {
            font-family: 'Noto Sans SC', Tahoma, Arial, Roboto, "Droid Sans", "Helvetica Neue", "Droid Sans Fallback", "Heiti SC", "Hiragino Sans GB", Simsun, sans-serif;
            color: #333;
            line-height: 1.6;
        }
        .hero {
            background: linear-gradient(135deg, #6B73FF 0%, #000DFF 100%);
        }
        .title-font {
            font-family: 'Noto Serif SC', serif;
        }
        .code-block {
            background-color: #f8f9fa;
            border-left: 4px solid #3b82f6;
        }
        .feature-card:hover {
            transform: translateY(-5px);
            box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
        }
        .comparison-table th {
            background-color: #f3f4f6;
        }
        .comparison-table tr:nth-child(even) {
            background-color: #f9fafb;
        }
        .drop-cap::first-letter {
            font-size: 3.5em;
            float: left;
            line-height: 0.8;
            margin-right: 0.1em;
            margin-top: 0.1em;
            font-weight: 700;
            color: #3b82f6;
        }
        .nav-item:hover {
            color: #3b82f6;
        }
        .nav-item::after {
            content: '';
            display: block;
            width: 0;
            height: 2px;
            background: #3b82f6;
            transition: width .3s;
        }
        .nav-item:hover::after {
            width: 100%;
        }
    </style>
</head>
<body class="bg-gray-50">
    <!-- Navigation -->
    <nav class="bg-white shadow-sm sticky top-0 z-50">
        <div class="max-w-6xl mx-auto px-4 sm:px-6 lg:px-8">
            <div class="flex justify-between h-16">
                <div class="flex items-center">
                    <div class="flex-shrink-0 flex items-center">
                        <i class="fas fa-folder-open text-blue-600 text-2xl mr-2"></i>
                        <span class="text-xl font-semibold text-gray-900 title-font">Linux文件系统指南</span>
                    </div>
                </div>
                <div class="hidden md:ml-6 md:flex md:items-center md:space-x-8">
                    <a href="#intro" class="nav-item text-gray-700 hover:text-gray-900 px-3 py-2 text-sm font-medium">简介</a>
                    <a href="#types" class="nav-item text-gray-700 hover:text-gray-900 px-3 py-2 text-sm font-medium">文件系统类型</a>
                    <a href="#comparison" class="nav-item text-gray-700 hover:text-gray-900 px-3 py-2 text-sm font-medium">对比分析</a>
                    <a href="#cases" class="nav-item text-gray-700 hover:text-gray-900 px-3 py-2 text-sm font-medium">实战案例</a>
                    <a href="#tips" class="nav-item text-gray-700 hover:text-gray-900 px-3 py-2 text-sm font-medium">高级技巧</a>
                </div>
            </div>
        </div>
    </nav>

    <!-- Hero Section -->
    <div class="hero text-white py-20">
        <div class="max-w-6xl mx-auto px-4 sm:px-6 lg:px-8">
            <div class="md:text-center">
                <h1 class="text-4xl md:text-5xl font-bold mb-6 title-font">深入理解Linux文件系统</h1>
                <p class="text-xl md:text-2xl max-w-3xl mx-auto">探索EXT4、XFS和Btrfs三大文件系统的核心特性与实战应用</p>
                <div class="mt-8">
                    <a href="#intro" class="inline-flex items-center px-6 py-3 border border-transparent text-base font-medium rounded-md text-blue-700 bg-white hover:bg-gray-100">
                        开始阅读 <i class="fas fa-arrow-down ml-2"></i>
                    </a>
                </div>
            </div>
        </div>
    </div>

    <!-- Main Content -->
    <div class="max-w-6xl mx-auto px-4 sm:px-6 lg:px-8 py-12">
        <!-- Introduction Section -->
        <section id="intro" class="mb-20">
            <div class="flex items-center mb-8">
                <div class="flex-shrink-0 h-12 w-12 rounded-full bg-blue-100 flex items-center justify-center">
                    <i class="fas fa-book text-blue-600 text-xl"></i>
                </div>
                <h2 class="ml-4 text-3xl font-bold text-gray-900 title-font">从图书馆到计算机：文件系统到底是什么？</h2>
            </div>
            <div class="prose max-w-none text-gray-700">
                <p class="drop-cap">想象你管理着一个巨大的图书馆（硬盘），每天要处理成千上万本书（文件）的存取。<strong class="text-blue-600">文件系统</strong>就是图书管理员的工作手册，它决定了：</p>
                <ul class="list-disc pl-6 space-y-2 mt-4">
                    <li>如何摆放书籍（数据存储）</li>
                    <li>怎样快速找到指定书籍（文件检索）</li>
                    <li>防止书籍损坏（数据安全）</li>
                    <li>新增书籍的存放策略（空间分配）</li>
                </ul>
                <p class="mt-4">在Linux系统中，<code class="bg-gray-100 px-2 py-1 rounded">lsblk -f</code>命令可以查看当前"图书馆管理方案"，就像查看图书馆的平面图：</p>
                <div class="code-block p-4 rounded-md mt-4 overflow-x-auto">
                    <pre class="m-0"><code>NAME   FSTYPE LABEL UUID
sda1   ext4         4f5b... 
sdb1   xfs          a8c2...</code></pre>
                </div>
            </div>
        </section>

        <!-- File System Types Section -->
        <section id="types" class="mb-20">
            <div class="flex items-center mb-8">
                <div class="flex-shrink-0 h-12 w-12 rounded-full bg-blue-100 flex items-center justify-center">
                    <i class="fas fa-folder-tree text-blue-600 text-xl"></i>
                </div>
                <h2 class="ml-4 text-3xl font-bold text-gray-900 title-font">三大文件系统角色档案</h2>
            </div>

            <div class="grid md:grid-cols-3 gap-8">
                <!-- EXT4 Card -->
                <div class="feature-card bg-white rounded-lg shadow-md p-6 transition duration-300 ease-in-out">
                    <div class="flex items-center mb-4">
                        <div class="flex-shrink-0 h-10 w-10 rounded-full bg-blue-100 flex items-center justify-center">
                            <i class="fas fa-shield-alt text-blue-600"></i>
                        </div>
                        <h3 class="ml-3 text-xl font-bold text-gray-900">EXT4：稳健的传统管理者</h3>
                    </div>
                    <p class="text-gray-700 mb-4">作为Linux的默认选择，EXT4就像经验丰富的图书馆长：</p>
                    <div class="space-y-3">
                        <p><strong class="text-blue-600">最大优势</strong>：成熟稳定，修复工具完善（<code class="bg-gray-100 px-1 py-0.5 rounded">fsck.ext4</code>）</p>
                        <p><strong class="text-blue-600">显著特点</strong>：</p>
                        <ul class="list-disc pl-6 space-y-1">
                            <li>日志记录借阅记录（Journaling）</li>
                            <li>按书架分区管理（块分配）</li>
                            <li>单个书库最大1EB（≈100万块4TB硬盘）</li>
                        </ul>
                    </div>
                    <div class="mt-6">
                        <h4 class="font-semibold text-gray-800 mb-2">实战场景</h4>
                        <p class="text-gray-700 mb-2">某Java日志系统每天产生50GB日志文件，使用EXT4配合<code class="bg-gray-100 px-1 py-0.5 rounded">logrotate</code>实现自动日志切割：</p>
                        <div class="code-block p-4 rounded-md mt-2 overflow-x-auto">
                            <pre class="m-0"><code># 日志切割配置示例
/var/log/app/*.log {
    daily
    rotate 7
    size 100M
    compress
    delaycompress
    missingok
}</code></pre>
                        </div>
                    </div>
                </div>

                <!-- XFS Card -->
                <div class="feature-card bg-white rounded-lg shadow-md p-6 transition duration-300 ease-in-out">
                    <div class="flex items-center mb-4">
                        <div class="flex-shrink-0 h-10 w-10 rounded-full bg-green-100 flex items-center justify-center">
                            <i class="fas fa-tachometer-alt text-green-600"></i>
                        </div>
                        <h3 class="ml-3 text-xl font-bold text-gray-900">XFS：大文件处理专家</h3>
                    </div>
                    <p class="text-gray-700 mb-4">XFS像擅长管理百科全书的管理员：</p>
                    <div class="space-y-3">
                        <p><strong class="text-green-600">核心理念</strong>：为超大文件而生（支持8EB单文件）</p>
                        <p><strong class="text-green-600">独门绝技</strong>：</p>
                        <ul class="list-disc pl-6 space-y-1">
                            <li>动态扩展书架（在线扩容）</li>
                            <li>并行处理借阅请求（多线程IO）</li>
                            <li>智能预读机制（提前准备相邻书籍）</li>
                        </ul>
                    </div>
                    <div class="mt-6">
                        <h4 class="font-semibold text-gray-800 mb-2">性能测试对比</h4>
                        <div class="code-block p-4 rounded-md mt-2 overflow-x-auto">
                            <pre class="m-0"><code># 测试写入性能
dd if=/dev/zero of=testfile bs=1G count=10
# EXT4平均速度：220MB/s
# XFS平均速度：310MB/s</code></pre>
                        </div>
                    </div>
                </div>

                <!-- Btrfs Card -->
                <div class="feature-card bg-white rounded-lg shadow-md p-6 transition duration-300 ease-in-out">
                    <div class="flex items-center mb-4">
                        <div class="flex-shrink-0 h-10 w-10 rounded-full bg-purple-100 flex items-center justify-center">
                            <i class="fas fa-robot text-purple-600"></i>
                        </div>
                        <h3 class="ml-3 text-xl font-bold text-gray-900">Btrfs：未来派的智能机器人</h3>
                    </div>
                    <p class="text-gray-700 mb-4">Btrfs是配备了AI的管理员：</p>
                    <div class="space-y-3">
                        <p><strong class="text-purple-600">革命性功能</strong>：</p>
                        <ul class="list-disc pl-6 space-y-1">
                            <li>自动备份书籍快照（<code class="bg-gray-100 px-1 py-0.5 rounded">btrfs subvolume snapshot</code>）</li>
                            <li>书籍自动去重（重复数据删除）</li>
                            <li>智能检测破损书籍（数据校验）</li>
                        </ul>
                        <p><strong class="text-purple-600">创新设计</strong>：</p>
                        <ul class="list-disc pl-6 space-y-1">
                            <li>书架和书籍统一管理（写时复制）</li>
                            <li>多种书籍摆放策略（压缩算法可选）</li>
                        </ul>
                    </div>
                </div>
            </div>
        </section>

        <!-- Comparison Section -->
        <section id="comparison" class="mb-20">
            <div class="flex items-center mb-8">
                <div class="flex-shrink-0 h-12 w-12 rounded-full bg-blue-100 flex items-center justify-center">
                    <i class="fas fa-balance-scale text-blue-600 text-xl"></i>
                </div>
                <h2 class="ml-4 text-3xl font-bold text-gray-900 title-font">功能对比表：三大文件系统华山论剑</h2>
            </div>
            <div class="overflow-x-auto">
                <table class="min-w-full comparison-table">
                    <thead>
                        <tr>
                            <th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">特性</th>
                            <th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">EXT4</th>
                            <th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">XFS</th>
                            <th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Btrfs</th>
                        </tr>
                    </thead>
                    <tbody class="bg-white divide-y divide-gray-200">
                        <tr>
                            <td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900">最大文件尺寸</td>
                            <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">16TB-1EB</td>
                            <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">8EB</td>
                            <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">16EB</td>
                        </tr>
                        <tr>
                            <td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900">在线扩容</td>
                            <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">不支持</td>
                            <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">支持</td>
                            <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">支持</td>
                        </tr>
                        <tr>
                            <td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900">写时复制</td>
                            <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">无</td>
                            <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">无</td>
                            <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">有</td>
                        </tr>
                        <tr>
                            <td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900">快照功能</td>
                            <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">需LVM</td>
                            <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">需LVM</td>
                            <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">原生支持</td>
                        </tr>
                        <tr>
                            <td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900">RAID支持</td>
                            <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">需mdadm</td>
                            <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">需mdadm</td>
                            <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">原生RAID 5/6</td>
                        </tr>
                        <tr>
                            <td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900">碎片化问题</td>
                            <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">中度</td>
                            <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">低</td>
                            <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">极低</td>
                        </tr>
                        <tr>
                            <td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900">数据校验</td>
                            <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">无</td>
                            <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">无</td>
                            <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">CRC32C</td>
                        </tr>
                        <tr>
                            <td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900">压缩支持</td>
                            <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">无</td>
                            <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">无</td>
                            <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">zlib/lzo/zstd</td>
                        </tr>
                    </tbody>
                </table>
            </div>
        </section>

        <!-- Case Studies Section -->
        <section id="cases" class="mb-20">
            <div class="flex items-center mb-8">
                <div class="flex-shrink-0 h-12 w-12 rounded-full bg-blue-100 flex items-center justify-center">
                    <i class="fas fa-laptop-code text-blue-600 text-xl"></i>
                </div>
                <h2 class="ml-4 text-3xl font-bold text-gray-900 title-font">实战案例：不同场景下的最佳选择</h2>
            </div>

            <div class="grid md:grid-cols-2 gap-8">
                <!-- Case 1 -->
                <div class="bg-white rounded-lg shadow-md overflow-hidden">
                    <div class="p-6">
                        <h3 class="text-xl font-bold text-gray-900 mb-4">案例1：电商数据库存储方案</h3>
                        <p class="text-gray-700 mb-4"><strong>需求</strong>：MySQL数据库需要处理每秒5000+事务</p>
                        <div class="code-block p-4 rounded-md overflow-x-auto">
                            <pre class="m-0"><code># 创建XFS文件系统并优化
mkfs.xfs -f -l size=512m,version=2 /dev/sdb
mount -o noatime,logbsize=256k /dev/sdb /data</code></pre>
                        </div>
                        <div class="mt-4">
                            <h4 class="font-semibold text-gray-800 mb-2">选择理由：</h4>
                            <ul class="list-disc pl-6 space-y-1">
                                <li>XFS的延迟分配策略减少碎片</li>
                                <li>多线程IO适合高并发场景</li>
                                <li>快速崩溃恢复保障数据安全</li>
                            </ul>
                        </div>
                    </div>
                </div>

                <!-- Case 2 -->
                <div class="bg-white rounded-lg shadow-md overflow-hidden">
                    <div class="p-6">
                        <h3 class="text-xl font-bold text-gray-900 mb-4">案例2：Java应用的日志管理</h3>
                        <p class="text-gray-700 mb-4"><strong>需求</strong>：Spring Boot应用每天产生20GB日志</p>
                        <div class="code-block p-4 rounded-md overflow-x-auto">
                            <pre class="m-0"><code>// 使用Btrfs快照实现日志归档
Runtime.getRuntime().exec("btrfs subvolume snapshot /var/log/app /var/log/app_archive/$(date +%Y%m%d)");</code></pre>
                        </div>
                        <div class="mt-4">
                            <h4 class="font-semibold text-gray-800 mb-2">方案优势：</h4>
                            <ul class="list-disc pl-6 space-y-1">
                                <li>秒级创建日志快照</li>
                                <li>透明压缩节省50%存储空间</li>
                                <li>内置校验和防止日志篡改</li>
                            </ul>
                        </div>
                    </div>
                </div>

                <!-- Case 3 -->
                <div class="bg-white rounded-lg shadow-md overflow-hidden col-span-1 md:col-span-2">
                    <div class="p-6">
                        <h3 class="text-xl font-bold text-gray-900 mb-4">案例3：视频流媒体服务器</h3>
                        <div class="grid md:grid-cols-2 gap-6">
                            <div>
                                <h4 class="font-semibold text-gray-800 mb-2">EXT4传统方案</h4>
                                <div class="code-block p-4 rounded-md overflow-x-auto">
                                    <pre class="m-0"><code>tune2fs -o journal_data_writeback /dev/sdc</code></pre>
                                </div>
                            </div>
                            <div>
                                <h4 class="font-semibold text-gray-800 mb-2">XFS优化方案</h4>
                                <div class="code-block p-4 rounded-md overflow-x-auto">
                                    <pre class="m-0"><code>mkfs.xfs -f -d su=64k,sw=4 /dev/sdd
mount -o inode64,noatime /dev/sdd /video</code></pre>
                                </div>
                            </div>
                        </div>
                        <div class="mt-6">
                            <h4 class="font-semibold text-gray-800 mb-2">性能测试结果：</h4>
                            <ul class="list-disc pl-6 space-y-1">
                                <li>4K随机读：XFS比EXT4快40%</li>
                                <li>大文件连续写：XFS吞吐量高35%</li>
                            </ul>
                        </div>
                    </div>
                </div>
            </div>
        </section>

        <!-- Advanced Tips Section -->
        <section id="tips" class="mb-20">
            <div class="flex items-center mb-8">
                <div class="flex-shrink-0 h-12 w-12 rounded-full bg-blue-100 flex items-center justify-center">
                    <i class="fas fa-magic text-blue-600 text-xl"></i>
                </div>
                <h2 class="ml-4 text-3xl font-bold text-gray-900 title-font">高级技巧：解锁文件系统隐藏技能</h2>
            </div>

            <div class="grid md:grid-cols-3 gap-8">
                <!-- Tip 1 -->
                <div class="bg-white rounded-lg shadow-md p-6">
                    <h3 class="text-xl font-bold text-gray-900 mb-4">EXT4数据抢救指南</h3>
                    <div class="code-block p-4 rounded-md overflow-x-auto">
                        <pre class="m-0"><code># 检查文件系统
fsck.ext4 -y /dev/sda1 

# 恢复删除文件（需安装extundelete）
extundelete --restore-all /dev/sda1</code></pre>
                    </div>
                </div>

                <!-- Tip 2 -->
                <div class="bg-white rounded-lg shadow-md p-6">
                    <h3 class="text-xl font-bold text-gray-900 mb-4">XFS极致性能调优</h3>
                    <div class="code-block p-4 rounded-md overflow-x-auto">
                        <pre class="m-0"><code># 调整日志参数
xfs_admin -c "logbsize=256k" /dev/sdb

# 增加预读缓冲区
echo "4096" > /sys/block/sdb/queue/read_ahead_kb</code></pre>
                    </div>
                </div>

                <!-- Tip 3 -->
                <div class="bg-white rounded-lg shadow-md p-6">
                    <h3 class="text-xl font-bold text-gray-900 mb-4">Btrfs空间魔法演示</h3>
                    <div class="code-block p-4 rounded-md overflow-x-auto">
                        <pre class="m-0"><code># 创建透明压缩卷
btrfs filesystem defragment -czstd /data

# 查看节省空间
btrfs filesystem du -s /data
# 输出示例：Total saved: 47.12GB</code></pre>
                    </div>
                </div>
            </div>
        </section>

        <!-- Selection Guide Section -->
        <section id="selection" class="mb-20">
            <div class="flex items-center mb-8">
                <div class="flex-shrink-0 h-12 w-12 rounded-full bg-blue-100 flex items-center justify-center">
                    <i class="fas fa-question-circle text-blue-600 text-xl"></i>
                </div>
                <h2 class="ml-4 text-3xl font-bold text-gray-900 title-font">选择指南：什么时候该用谁？</h2>
            </div>

            <div class="grid md:grid-cols-3 gap-8">
                <!-- EXT4 Guide -->
                <div class="bg-white rounded-lg shadow-md p-6">
                    <h3 class="text-xl font-bold text-gray-900 mb-4 flex items-center">
                        <i class="fas fa-check-circle text-blue-600 mr-2"></i> 首选EXT4的场景
                    </h3>
                    <ul class="list-disc pl-6 space-y-2">
                        <li>系统根分区（稳定性优先）</li>
                        <li>U盘等移动存储（兼容性好）</li>
                        <li>传统机械硬盘（HDD）</li>
                    </ul>
                </div>

                <!-- XFS Guide -->
                <div class="bg-white rounded-lg shadow-md p-6">
                    <h3 class="text-xl font-bold text-gray-900 mb-4 flex items-center">
                        <i class="fas fa-bolt text-green-600 mr-2"></i> XFS的理想舞台
                    </h3>
                    <ul class="list-disc pl-6 space-y-2">
                        <li>视频编辑工作站</li>
                        <li>大型数据库（MySQL/MongoDB）</li>
                        <li>持续写入的监控系统</li>
                    </ul>
                </div>

                <!-- Btrfs Guide -->
                <div class="bg-white rounded-lg shadow-md p-6">
                    <h3 class="text-xl font-bold text-gray-900 mb-4 flex items-center">
                        <i class="fas fa-cogs text-purple-600 mr-2"></i> Btrfs的用武之地
                    </h3>
                    <ul class="list-disc pl-6 space-y-2">
                        <li>个人NAS存储系统</li>
                        <li>需要频繁快照的开发环境</li>
                        <li>固态硬盘（SSD）为主的系统</li>
                    </ul>
                </div>
            </div>

            <div class="mt-8 bg-white rounded-lg shadow-md p-6">
                <h3 class="text-xl font-bold text-gray-900 mb-4">混合使用案例</h3>
                <p class="text-gray-700 mb-4">某云计算平台配置方案：</p>
                <div class="code-block p-4 rounded-md overflow-x-auto">
                    <pre class="m-0"><code>/          → EXT4（系统稳定性）
/var/lib/docker → Btrfs（容器快照功能）
/data      → XFS（承载数据库服务）
/backup    → Btrfs（压缩+去重节省空间）</code></pre>
                </div>
            </div>
        </section>

        <!-- Mermaid Diagram -->
        <section class="mb-20">
            <div class="bg-white rounded-lg shadow-md p-6">
                <h3 class="text-xl font-bold text-gray-900 mb-4">文件系统选择流程图</h3>
                <div class="mermaid">
                    graph TD
                        A[需要文件系统?] --> B{是否系统根分区?}
                        B -->|是| C[EXT4]
                        B -->|否| D{需要高性能大文件处理?}
                        D -->|是| E[XFS]
                        D -->|否| F{需要快照/压缩/去重?}
                        F -->|是| G[Btrfs]
                        F -->|否| H[EXT4]
                </div>
            </div>
        </section>
    </div>

    <!-- Footer -->
    <footer class="bg-gray-900 text-gray-300 py-8">
        <div class="max-w-6xl mx-auto px-4 sm:px-6 lg:px-8">
            <div class="flex flex-col md:flex-row justify-between items-center">
                <div class="mb-4 md:mb-0">
                    <p class="text-lg font-medium">技术小馆</p>
                </div>
                <div>
                    <a href="http://www.yuque.com/jtostring" class="hover:text-white transition duration-150 ease-in-out">http://www.yuque.com/jtostring</a>
                </div>
            </div>
        </div>
    </footer>

    <script>
        mermaid.initialize({
            startOnLoad: true,
            theme: 'default',
            flowchart: {
                useMaxWidth: false,
                htmlLabels: true,
                curve: 'basis'
            }
        });
    </script>
</body>
</html>